<template>
  <el-row type="flex" justify="space-between" align="middle">
    <el-col :span="1">
      <el-button size="mini" icon="el-icon-arrow-left" @click="changeCollapse"></el-button>
    </el-col>
    <el-col :span="20">
      <bread-crumb></bread-crumb>
    </el-col>
    <el-col :span="2">
      <el-dropdown trigger="click">
        <span class="el-dropdown-link">
          <img :src="userImg" class="user-img" />
          <i class="el-icon-arrow-down el-icon--right"></i>
        </span>
        <el-dropdown-menu slot="dropdown">
          <el-dropdown-item icon="el-icon-plus">黄金糕</el-dropdown-item>
          <el-dropdown-item icon="el-icon-circle-plus">狮子头</el-dropdown-item>
          <el-dropdown-item icon="el-icon-circle-plus-outline">螺蛳粉</el-dropdown-item>
          <el-dropdown-item icon="el-icon-check">双皮奶</el-dropdown-item>
          <el-dropdown-item icon="el-icon-circle-check">蚵仔煎</el-dropdown-item>
        </el-dropdown-menu>
      </el-dropdown>
    </el-col>
  </el-row>
</template>

<script>
import BreadCrumb from "@/components/BreadCrumb";

export default {
  name: "HeadBar",
  components: {
    BreadCrumb
  },
  methods: {
    changeCollapse() {
      this.$store.commit("changeCollapse");
    }
  },
  data() {
    return {
      userImg: require("@/assets/images/user.png")
    };
  }
};
</script>

<style lang="scss" scoped>
.el-row {
  width: 100%;
  border-width: thick;
}

.el-dropdown-link {
  cursor: pointer;
}

.user-img {
  width: 50px;
  height: 50px;
  border-radius: 100%;
}
</style>
